package com.loong.order.model;

import com.loong.common.mybatis.entity.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "order_base")
public class OrderBase extends BaseEntity {

    /**
     * 店铺 id
     */
    @Column(name = "shop_id")
    private Long shopId;
    /**
     * 订单号
     */
    @Column(name = "order_number")
    private String orderNumber;

    /**
     * 下单时间
     */
    @Column(name = "create_order_time")
    private Date createOrderTime;

    /**
     * 期望送达时间
     */
    @Column(name = "expect_time")
    private Date expectTime;

    /**
     * 总价(sku总价)
     */
    @Column(name = "total_price")
    private BigDecimal totalPrice;

    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 配送费
     */
    @Column(name = "post_fee")
    private BigDecimal postFee;

    /**
     * 总包装费
     */
    @Column(name = "food_box_fee")
    private BigDecimal foodBoxFee;

    /**
     * 优惠金额
     */
    @Column(name = "discount_price")
    private BigDecimal discountPrice;

    /**
     * 实付金额
     */
    private BigDecimal payment;

    /**
     * 支付类型
     */
    @Column(name = "payment_type")
    private String paymentType;

    /**
     * 付款时间
     */
    @Column(name = "payment_time")
    private Date paymentTime;

    /**
     * 发货时间
     */
    @Column(name = "delivery_time")
    private Date deliveryTime;

    /**
     * 交易完成时间
     */
    @Column(name = "end_time")
    private Date endTime;

    /**
     * 交易结束时间
     */
    @Column(name = "close_time")
    private Date closeTime;

    /**
     * 买家id
     */
    @Column(name = "user_id")
    private Long userId;

    /**
     * 买家昵称
     */
    @Column(name = "user_nick")
    private String userNick;

    /**
     * 买家是否评论
     */
    @Column(name = "comment_flag")
    private Boolean commentFlag;

    /**
     * 买家是否自取
     */
    @Column(name = "invite_flag")
    private Boolean inviteFlag;

    /**
     * 自取时间
     */
    @Column(name = "invite_time")
    private Date inviteTime;

    /**
     * 订单备注
     */
    @Column(name = "order_remark")
    private String orderRemark;


}